package software.agileCourse2013.KillerGame.data.dao.implement;

import java.util.List;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import software.agileCourse2013.KillerGame.data.dao.Userdao;
import software.agileCourse2013.KillerGame.data.dataobject.User;

public class userImpl extends HibernateDaoSupport implements Userdao {

	@Override
	public boolean addUser(User user) {
		return false;
		
	}

	@Override
	public boolean delUser() {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean updateUser() {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean getPassWordByName(String userName,String password) {
		String hql=" from User where user_name=:userName and password=:password";
		@SuppressWarnings("unchecked")
		List<User> user=this.getHibernateTemplate().find(hql,userName,password);
		if(user.size()==0||user==null){
			return false;
		}
		else return true;
		
	}

}
